<?php

namespace app\index\controller;

use think\Controller;
use think\Db;
use think\Request;

class Cinema extends Controller
{
    /**
     * 显示资源列表
     *
     * @return \think\Response
     */
    public function index()
    {
        $isfilm = Db::table('schedule')->field('film_id')->select();
        foreach ($isfilm as $v) {$arr[] = $v['film_id'];}
        $map['id'] = array('in',implode(",", array_unique($arr)));
        $data = Db::table('film')->where($map)->select();
        $this->assign('data', $data);
        return $this->fetch('index/cinema');
    }

}
